/**
 * 接口路由
 * @author YuanJiu
 */
import {getUserInfoByToken, register} from "./controller/user.js";
import {login} from "./controller/user.js";
import {sendMessage} from "./controller/sms.js";
import {getVideo, getVideoById, uploadVideo} from "./controller/video.js";

const routes = [
    {
        path:"/register",
        method:"POST",
        handler: register
    },
    {
        path: "/login",
        method: "POST",
        handler: login
    },
    {
        path: "/sms",
        method: "POST",
        handler: sendMessage
    },
    {
        path: "/getUserInfoByToken",
        method: "POST",
        handler: getUserInfoByToken
    },
    {
        path: "/uploadVideo",
        method: "POST",
        handler: uploadVideo
    },
    {
        path: "/getVideoData",
        method: "GET",
        handler: getVideo
    },
    {
        path: "/getVideoDataById",
        method: "GET",
        handler: getVideoById
    }
];

export default routes;
